﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SecurityApi.Business;
using SecurityApi.DataAccess;

namespace SecurityApi.UnitTest
{
    [TestClass]
    public class SoapApiTest
    {

        [TestCategory("SOAP API")]
        [TestMethod()]
        public void GetUserApplicationsTest()
        {
            ApplicationSecurityManager mgr = new ApplicationSecurityManager();
            SecurityServiceReference.SecurityServiceClient soapClient = new SecurityServiceReference.SecurityServiceClient();

            SecurityApi.Model.Application[] list = soapClient.GetUserApplicationsByName(@"user2@codeplex.com", 1);
        }


        [TestCategory("SOAP API")]
        [TestMethod()]
        public async Task VerifyUserTest()
        {
            ApplicationSecurityManager mgr = new ApplicationSecurityManager();
            string userName = @"user1@codeplex.com";
            string password = @"T@p$ecret2010";
            int enterpriseId = 1;

            SecurityServiceReference.SecurityServiceClient soapClient = new SecurityServiceReference.SecurityServiceClient();
            bool result = soapClient.VerifyUser(userName, password, enterpriseId);
        }



    }
}
